#!/usr/bin/env python
# codeing:utf-8
"""
    登录的业务，使用secureCRT 没有写完
    jiazurongyu

"""
import os
import sys
import time
import paramiko

#密钥本地地址
KEY_FILE=""
#把HOST和PORT拿到外面

#考虑是否改写到__init__
class loginServer(object):

    def loginServer(self,username,key):
    """
            pwd和key互斥 key暂时留着

    """
        # self.host =host
        # self.port =port
        self.username =username
        #self.pwd =pwd
        self.key =key

        _ssh= paramiko.SSHClient()
        _ssh.load_system_host_keys()
        _ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
        _ssh.connect(username,key)
        _ssh = _ssh.invoke_shell()